1. Field of the Invention
The present invention relates to a data storage apparatus for storing various data in a nonvolatile memory such as an EEPROM by using a battery as a power supply.
2. Description of the Related Art
In conventional data storage apparatuses such as an electronic notebook and an electronic wristwatch, various types of data, e.g., name/telephone-number data and schedule data, are stored in a RAM. Power is supplied from a battery to the RAM to preserve the stored contents. When the voltage of the battery is decreased, the exhaustion of the battery is informed to a user. In order to prevent the stored contents from being lost upon replacement of the exhausted battery, for example, a large-capacitance capacitor is connected in parallel with the RAM. With this arrangement, the data stored in the RAM is preserved for a predetermined period of time until the discharge voltage of the capacitor is decreased, thus allowing the user to replace the battery with a new one within the predetermined period of time.
In a conventional data storage apparatus, however, if replacement of a battery is not performed when it is necessary, the data stored in the RAM is lost. For this reason, the use of a nonvolatile memory such as an EEPROM (electrically erasable and programmable read only memory) capable of preserving the stored contents when the power supply is turned off has been proposed.
An EEPROM is designed to perform a write operation at a high voltage. If, therefore, the battery voltage is not sufficiently high, data cannot be properly written. In addition, the EEPROM has a data write count limit. If a write operation is repeatedly performed a number of times exceeding a predetermined number, normally, no more data can e written in the corresponding storage area.
In general, when various data such as name/telephone-number data and schedule data are to be stored in an EEPROM, since data editing is frequently repeated, the data write count is increased. Therefore, when a data write operation with respect to the EEPROM is disabled, the user cannot judge whether the write operation is disabled by the exhaustion of the battery or an excessive data write count.